<!DOCTYPE html>
<html lang="en">

<head>
     {ms:include filename=headFile.htm/} 
</head>

<body class="white">
    <div id="appCtrl" v-locak>
        <mt-header title="重置密码">
            <a href="javascript:;" @click="history.go(-1)" slot="left">
                <mt-button icon="back"></mt-button>
            </a>
        </mt-header>
        <div class="form-login">

            <mt-field 
            label="原密码"
            type="password"
            placeholder="请输入原密码"
            v-model="psw">
            </mt-field>

            <mt-field 
            label="新密码"
            placeholder="设置6~20位之间的密码"
            type="password" v-model="newPsw">
            </mt-field>
            <mt-field 
            label="确认新密码"
            placeholder="请输入确认密码"
            type="password" v-model="checkPsw">
            </mt-field>

            <div style="padding:15px">
                <mt-button size="large" type="primary" @click.native="submit">确定</mt-button>
            </div>
            
        </div>
    </div>
    <script>
    var vm = new Vue({
        el: '#appCtrl',

        data: function(){
        	return {
        		psw:'',
                newPsw:'',
                code:'',
                checkPsw:'',

                start: false
        	}
        },

        methods:{
        	submit: function(){
                
        		if(!this.psw){
        			this.$toast('请输入登录密码');
        			return;
        		}
        		if(this.newPsw.length<6||this.newPsw.length>20){
        			this.$toast('6~20位之间的密码');
        			return;
        		}
                if(this.newPsw!=this.checkPsw){
                    this.$toast('确认密码错误');
                    return;
                }
        	},

        }
    })
    </script>
</body>

</html>